function num1(val){
	if((val+"").length==1){
		return "0"+val;
	}
	return val;
}
function date1(datestr){
	var date,time,strs=datestr.split(" "),cm=new Date().getTime(),dates,divm;
	date = strs[0];
	if(strs.length>1)time = strs[1].split(":");
	dates=date.split("-");
	date=new Date();
	date.setFullYear(parseInt(dates[0],10));
	date.setMonth(parseInt(dates[1])-1);
	date.setDate(parseInt(dates[2]));
	if(time){
		date.setHours(parseInt(time[0]));
		date.setMinutes(parseInt(time[1]));
	}else{
		date.setHours(0);
		date.setMinutes(0);
	}
	divm=cm-date.getTime();
	divm /= 1000*60;
	divm = parseInt(divm);
	if(divm<2)return "刚刚";
	if(divm<60)return divm+"分钟以前";
	divm/= 60;
	divm = parseInt(divm);
	if(divm<24)return divm+"小时以前";
	divm/=24;
	divm = parseInt(divm);
	if(divm==1)return "昨天";
	if(divm==2)return "前天";
	if(divm<30)return divm+"天以前";
	return datestr;
}